package OnJava8.functional;

/**
 * @Auther DRevelation
 * @Date 2020-05-25 下午 14:37
 * @Desc
 */
public class FunctionalAnnotation {
    public String goodbye(String arg) {
        return "Goodbye, " + arg;
    }

    public static void main(String[] args) {
        FunctionalAnnotation fa = new FunctionalAnnotation();

        Functional f = fa::goodbye;
        FunctionalNoAnn fna = fa::goodbye;

        Functional fl = a -> "Goodbye, " + a;
        Functional fnal = a -> "Goodbye, " + a;
    }
}

@FunctionalInterface
interface Functional {
    String goodbye(String arg);
}

interface FunctionalNoAnn {
    String goodbye(String arg);
}